/*    */ package com.zimbra.cs.mailclient.util;
/*    */ 
/*    */ import java.io.DataInputStream;
/*    */ import java.io.EOFException;
/*    */ import java.io.IOException;
/*    */ import java.io.InputStream;
/*    */ import java.io.OutputStream;
/*    */ import java.util.Iterator;
/*    */ import java.util.List;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public final class Io
/*    */ {
/*    */   public static void readFully(InputStream is, byte[] b, int off, int len)
/*    */     throws IOException
/*    */   {
/* 33 */     new DataInputStream(is).readFully(b, off, len);
/*    */   }
/*    */   
/*    */   public static void readFully(InputStream is, byte[] b) throws IOException {
/* 37 */     readFully(is, b, 0, b.length);
/*    */   }
/*    */   
/*    */   public static void copyBytes(InputStream is, OutputStream os, int len) throws IOException
/*    */   {
/* 42 */     byte[] b = new byte['က'];
/* 43 */     while (len > 0) {
/* 44 */       int n = is.read(b, 0, Math.min(b.length, len));
/* 45 */       if (n == -1) {
/* 46 */         throw new EOFException("Unexpected end of stream");
/*    */       }
/* 48 */       os.write(b, 0, n);
/* 49 */       len -= n;
/*    */     }
/*    */   }
/*    */   
/*    */   public static void copyBytes(InputStream is, OutputStream os) throws IOException
/*    */   {
/* 55 */     byte[] b = new byte['က'];
/*    */     int len;
/* 57 */     while ((len = is.read(b, 0, b.length)) != -1) {
/* 58 */       os.write(b, 0, len);
/*    */     }
/*    */   }
/*    */   
/*    */   public static String toString(List<Object> items, String separator) {
/* 63 */     StringBuilder sb = new StringBuilder();
/* 64 */     Iterator<Object> it = items.iterator();
/* 65 */     if (it.hasNext()) {
/* 66 */       sb.append(it.next());
/* 67 */       while (it.hasNext()) {
/* 68 */         sb.append(separator).append(it.next());
/*    */       }
/*    */     }
/* 71 */     return sb.toString();
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/mailclient/util/Io.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */